<template>
  <div>
    <van-nav-bar title="地图找房" left-arrow @click-left="$router.go(-1)" />
    <div class="map">
      <Map :mapInfo="info"></Map>
    </div>
  </div>
</template>

<script>
import Map from '@/components/map/map.vue'
import { getMap } from '@/api/area'
import { mapState } from 'vuex'
export default {
  name: 'MapPage',
  props: {},
  components: {
    Map
  },
  data () {
    return {
      info: ''
    }
  },
  computed: {
    ...mapState('user', ['cityId'])
  },
  async created () {
    console.log(this.cityId)
    const data = await getMap(this.cityId)
    console.log(data)
    this.info = data.body
    console.log(this.info)
  }
}
</script>

<style scoped lang="less">
.map {
  width: 100%;
  height: 600px;
}
</style>
